<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div>
<input type="button" value="按钮1" @click="f()">
<input type="button" value="按钮2" v-on:click="f()">
  <!--值改变事件-->
  <select @change="c()" v-model="city">
    <option>北京</option>
    <option>上海</option>
    <option>广州</option>
  </select>
  <!--失去焦点事件-->
  <input type="text" @blur="b()">

</div>
<script src="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/vue/2.6.14/vue.min.js"></script>
<script>
  let v = new Vue({
    el:"div",
    data:{
      city:""
    },
    methods:{
      f:function () {
       console.log("按钮点击了");
      },
      c:function () {
        console.log("值变了" +v.city)
      },
      b(){
        console.log("编辑完成!");
      }
    }
  })
</script>
</body>
</html>